%union {
	double dval;
	int vblno;
}
%token <vblno>	NAME 
%token <dval>	NUMBER 
%type  <dval>	statment expression
%left ASSIGN
%left ADD SUB
%left MUL DIV
%nonassoc UMINUS
%{
double var[26]={0};
%}
%%
statment	: NAME ASSIGN expression	{printf("= %f\n",var[$1]=$3)}
		| expression			{printf("= %f\n",$1)}
		;
expression	: expression ADD expression	{$$=$1+$3} 
		| expression SUB expression	{$$=$1-$3}
		| expression MUL expression	{$$=$1*$3}
		| expression DIV expression	{$$=$1/$3}
		| NUMBER			{$$=$1}
		| NAME				{$$=var[$1]}
		;
